package com.gzhryc.email.dao.db;

import java.util.Date;

import com.gzhryc.email.dao.enums.InsideEmailEnum;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;

/**
 * 网站内部邮件
 * @author 张浩
 * @version 2016-11-15
 */
@Table(name="email_inside_email")
public class InsideEmail {

	@Id
	protected Long id;
	@Column
	protected String title;				//邮件标题
	@Column(type="text")
	protected String content;			//邮件内容
	@Column
	protected String author;			//邮件发送者名称
	@Column
	protected String type;				//邮件类型
	@Column
	protected Integer status;			//状态，1:草稿，2:已发送
	@Column
	protected Integer attachmentCount;	//附件数量
	//辅助属性
	@Column(name="operator_id")
	protected Long operatorId;			//操作人ID
	@Column(name="create_date")
	protected Date createDate;			//创建时间
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Long getOperatorId() {
		return operatorId;
	}
	public void setOperatorId(Long operatorId) {
		this.operatorId = operatorId;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Integer getAttachmentCount() {
		return attachmentCount;
	}
	public void setAttachmentCount(Integer attachmentCount) {
		this.attachmentCount = attachmentCount;
	}
	
	public String getStatusName() {
		return InsideEmailEnum.Status.note(this.status);
	}
}
